home *** CD-ROM | disk | FTP | other *** search
- #include <exec/types.h>
-
- #include <devices/sana2.h>
- #include <dos/dos.h>
-
- #include <clib/alib_protos.h>
- #include <clib/exec_protos.h>
-
- VOID main(VOID)
- {
- struct IOSana2Req *cnetReqBlk;
- struct MsgPort *cnetPort;
-
- if(cnetPort=CreatePort(NULL, NULL))
- {
- if(cnetReqBlk=(struct IOSana2Req *)CreateExtIO(cnetPort, sizeof(struct IOSana2Req)))
- {
- if(!OpenDevice("Networks/cnet.device", 0, (struct IORequest *)cnetReqBlk, NULL))
- {
- Wait(SIGBREAKF_CTRL_C);
- CloseDevice((struct IORequest *)cnetReqBlk);
- }
- DeleteExtIO((struct IORequest *)cnetReqBlk);
- }
- DeletePort(cnetPort);
- }
- }
-